package com.hyjx.framework.component.interfaceservice.interfacelog;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.hyjx.framework.component.interfaceservice.dataservice.DataServiceModel;
import com.hyjx.framework.component.interfaceservice.datauser.DataUserModel;
import com.hyjx.framework.orm.dao.IBaseDao;
import com.hyjx.framework.orm.dao.Pager;
import org.springframework.transaction.annotation.Transactional;

/**
 * 接口访问服务日志接口实现
 */
@Service
@Transactional
public class InterfaceLogServiceImpl implements InterfaceLogService{
	@Resource
	private IBaseDao dao;
	
	public Pager queryListLog(AttachLogModel model){
		return dao.getPager(model.getModuleName() + ".queryList", model.getModuleName() + ".queryCount", model);
	}
	
	public DataUserModel queryUserName(DataUserModel model){
		DataUserModel m=(DataUserModel) dao.queryObject(model.getModuleName() + ".queryObject", model);
		return m;
	}
	
	public DataServiceModel querySrvName(DataServiceModel model){
		DataServiceModel m=(DataServiceModel) dao.queryObject(model.getModuleName() + ".getInfoById", model);
		return m;
	}

	public List<AttachLogModel> getUserList() {
	
		return dao.queryObjectList("interface_log.queryuserList");
	}

	@Override
	public List<AttachLogModel> getsrvList() {
		return dao.queryObjectList(new AttachLogModel().getModuleName() + ".querysrvList");
	}
	@Override
	public List<AttachLogModel> getresultList() {
		return dao.queryObjectList(new AttachLogModel().getModuleName() + ".queryresultList");
	}
}
